﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="OrderTour.aspx.cs" Inherits="admin_OrderTour" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style2
        {
            color: yellow;
        }
        .style3
        {
            font-size: medium;
        }
        .style4
        {
            color: #FFFFFF;
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
                DataKeyNames="orderID" ForeColor="Black" GridLines="Vertical" OnRowDeleting="GridView1_RowDeleting"
                Width="820px" 
                OnSelectedIndexChanging="GridView1_SelectedIndexChanging" AllowPaging="True" 
                OnPageIndexChanging="GridView1_PageIndexChanging" BackColor="White" 
                BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
                onrowediting="GridView1_RowEditing" EmptyDataText="No Record Found!">
                <FooterStyle BackColor="#CCCCCC" />
                <Columns>
                    <asp:BoundField DataField="NO" HeaderText="No">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_right"/>
                    <ItemStyle Width="5px" CssClass="text_right"/>
                    </asp:BoundField>

                    <asp:BoundField DataField="tourCode" HeaderText="Code">
                    <ControlStyle Width="100px" />
                    <HeaderStyle ForeColor="Yellow" CssClass="text_left"/>
                    <ItemStyle Width="80px" CssClass="text_left"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="tourName" HeaderText="Tour Name">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_left"/>
                    <ItemStyle Width="185px" CssClass="text_left"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="cusName" HeaderText="Customer" >
                    <HeaderStyle ForeColor="Yellow" CssClass="text_left"/>
                    <ItemStyle Width="150px" CssClass="text_left"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="Tel" HeaderText="Tel">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_left"/>
                    <ItemStyle Width="120px" CssClass="text_left"/>
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Room" DataField="numRoom">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_right" />
                    <ItemStyle Width="60px" CssClass="text_right" />
                    </asp:BoundField>
                    <asp:BoundField DataField="numAdult" HeaderText="Adult">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_right"/>
                    <ItemStyle Width="60px" CssClass="text_right" />
                    </asp:BoundField>
                    <asp:BoundField DataField="numChild" HeaderText="Child">
                    <HeaderStyle ForeColor="Yellow" CssClass="text_right"/>
                    <ItemStyle Width="60px" CssClass="text_right"/>
                    </asp:BoundField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton3" runat="server" CommandName="edit" 
                                ImageUrl="~/img/check.jpg" />
                        </ItemTemplate>
                        <ItemStyle Width="20px" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                CommandName="Update" Text="Update"></asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemStyle Width="20px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            &nbsp;<asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" 
                                CommandName="select" ImageUrl="~/img/detail.gif" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemStyle Width="20px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            &nbsp;<asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" 
                                CommandName="Delete" ImageUrl="~/img/delete.gif" 
                                onclientclick="return confirm('Are you sure?');" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="cusID" HeaderText="CusID" Visible="False" />
                    <asp:BoundField DataField="tourID" HeaderText="TourID" Visible="False" />
                    <asp:BoundField DataField="orderID" HeaderText="OrderID" Visible="False" />
                </Columns>
                <SelectedRowStyle Font-Bold="False" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="#CCCCCC" />
             <%--   <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#808080" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#383838" />--%>
            </asp:GridView>
            <table style="width: 820px">
                <tr>
                    <td colspan="2" class="style1" style="text-align:right">
                        <asp:Label ID="lblCalRoom" Text="(1 room = 2 adult = 4 child)" runat="server"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:LinkButton ID="LinkButton3" runat="server" ForeColor="Yellow" 
                            onclick="LinkButton3_Click">Display all tours</asp:LinkButton>
                    </td>
                </tr>
            </table>
        </asp:View>
        <br />
        <asp:View ID="View2" runat="server">
        <div style="width:820px">
        &nbsp;<fieldset>
            <legend class="style2"><strong>Customer&#39;s Information</strong></legend>
            <table style="width: 90%">
                <tr>
                    <td style="width: 15%; " class="style4">
                        Name:
                    </td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblCusName" runat="server" CssClass="style3"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style4" style="width: 15%; ">
                        Adults:</td>
                    <td style="width: 25%; text-align: left">
                        <asp:DropDownList ID="ddlAdult" runat="server" 
                            Enabled="False">
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                            <asp:ListItem>7</asp:ListItem>
                            <asp:ListItem>8</asp:ListItem>
                            <asp:ListItem>9</asp:ListItem>
                            <asp:ListItem>10</asp:ListItem>
                            <asp:ListItem>11</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td class="style1" style="width: 15%; ">
                        Child:</td>
                    <td style="width: 45%; text-align: left">
                        <asp:DropDownList ID="ddlChild" runat="server"
                            Enabled="False">
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                            <asp:ListItem>7</asp:ListItem>
                            <asp:ListItem>8</asp:ListItem>
                            <asp:ListItem>9</asp:ListItem>
                            <asp:ListItem>10</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style4" style="width: 15%; ">
                        Tel:</td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblTel" runat="server" CssClass="style3"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%; " class="style4">
                        Email:</td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblEmail" runat="server" CssClass="style3"></asp:Label>
                    </td>
                </tr>
            </table>
        </fieldset>
        <br />
        <fieldset>
            <legend class="style2"><strong>Tour&#39;s Information</strong></legend>
            <table style="width: 90%">
                <tr>
                    <td class="style1" style="width: 15%; ">
                        Code:</td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblTourCode" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 15%; ">
                        Tour:</td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblTourName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 15%; ">
                        Place start:</td>
                    <td style="width: 35%; text-align: left" class="style1">
                        <asp:Label ID="lblPlaceStart" runat="server"></asp:Label>
                    </td>
                    <td class="style1" style="width: 15%; ">
                        Place end:</td>
                    <td style="text-align: left" class="style1">
                        <asp:Label ID="lblPlaceEnd" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 15%; ">
                        Date start:</td>
                    <td style="width: 35%; text-align: left" class="style1">
                        <asp:Label ID="lblDateStart" runat="server"></asp:Label>
                    </td>
                    <td class="style1" style="width: 15%; ">
                        Date end:</td>
                    <td style="width: 35%; text-align: left" class="style1">
                        <asp:Label ID="lblDateEnd" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 15%; ">
                        Itinerary:</td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblItinerary" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="width: 15%; ">
                        Plan:</td>
                    <td style="width: 85%; text-align: left" colspan="3" class="style1">
                        <asp:Label ID="lblPlan" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </fieldset>
        <asp:Button ID="btnCancel" runat="server" CausesValidation="False" 
                            OnClick="btnCancel_Click" Text="Back" Width="81px" />
        </div>
        </asp:View>
    </asp:MultiView>

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#ctl00_ContentPlaceHolder1_GridView1").tablesorter();
        });
    </script>
</asp:Content>

